package com.pn.taikao.mapper;

import com.pn.taikao.entity.PaperQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PaperQuestionMapper {
    int insert(PaperQuestion paperQuestion);

    int deleteById(@Param("id") Long id);

    int deleteByPaperId(@Param("paperId") Long paperId);

    PaperQuestion selectById(@Param("id") Long id);

    List<PaperQuestion> selectByPaperId(@Param("paperId") Long paperId);

    List<Long> selectQuestionIdsByPaperId(@Param("paperId") Long paperId);

    long countByPaperId(@Param("paperId") Long paperId);
    
    int deleteByPaperIdAndQuestionId(@Param("paperId") Long paperId, @Param("questionId") Long questionId);
    
    PaperQuestion selectByPaperIdAndQuestionId(@Param("paperId") Long paperId, @Param("questionId") Long questionId);
}

